package com.lavida.project.system.emp.service;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.lavida.project.system.emp.domain.Emp;
import com.lavida.project.system.emp.domain.Roster;
import com.lavida.project.system.emp.mapper.EmpMapper;

@Service
public class EmpServiceImpl implements EmpService{
	@Autowired
	private EmpMapper empMapper;
	
	@Override
	public Emp selectEmpByempno(Integer job_id) {
		return empMapper.selectEmpByempno(job_id);
	}
	@Override
	public int deleteEmpMesssage(int[] job_ids) {
		int j = 0;
		for (int i = 0; i < job_ids.length; i++) {
			empMapper.deleteEmpMesssage(job_ids[i]);
			j++;
		}
		return j;
	}
	@Override
	public int insertEmpMessage(Roster roster) {
		
		return empMapper.insertEmpMessage(roster);
	}
	@Override
	public Emp selectByJob_id(Integer job_id) {
		
		return empMapper.selectByJob_id(job_id);
	}
	@Override
	public int updateEmpMessage(Roster roster) {
		// TODO Auto-generated method stub
		return empMapper.updateEmpMessage(roster);
	}
	@Override
	public int updateEmp(Emp emp) {
		// TODO Auto-generated method stub
		return empMapper.updateEmp(emp);
	}
}
